{wc:templates "index","header"}
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/LotteryDetail.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/yj_LotteryDetail.css"/>
<link rel="stylesheet" type="text/css" href="{G_TEMPLATES_STYLE}/css/header.css"/>
<div class="Current_nav">
	<a href="{WEB_PATH}">首页</a> <span>&gt;</span> 
	<a href="{WEB_PATH}/goods_list/{wc:$item['cateid']}">
	{wc:$category['name']}
	</a> <span>&gt;</span> 
	<a href="{WEB_PATH}/goods_list/{wc:$item['cateid']}e{wc:$item['brandid']}">
	{wc:$brand['name']}
	</a><span>&gt;</span>揭晓详情 
</div>
<div class="show_content">
	<!-- 商品期数 -->
	<div id="divPeriodList" class="show_Period">		
		{wc:$loopqishu}	
	</div>
	<!-- 商品信息 -->
	<!--商品揭晓-->
            <div id="div_ngresult" class="ng-result-wrapper clearfix ">
                <!--图片展示-->
                <div class="ng-result-img">
                    <div class="result-img-wrapper">

                        <a href="{WEB_PATH}/goods/{wc:$item['id']}" title="{wc:$item['title']}"><img width="242" height="242" src="{G_UPLOAD_PATH}/{wc:$item['thumb']}"></a>
                    </div>
                    <a href="{WEB_PATH}/goods/{wc:$itemzx['id']}" class="result-more">查看商品详情</a>
                </div>
                <!--揭晓结果-->
                <div class="ng-result-detail">
                    <div class="result-con-wrapper">
                        <h2 class="title">

                            <span class="num">(第{wc:$item['qishu']}期)</span>
                            {wc:$item['title']}
                            
                        </h2>
                        <p class="price">
                            价值：{wc:$item['money']}
                            
                        </p>
                        
                        <div class="result-main">
                            <div class="result-con-info">
                                <p class="r-name">
                                    <span><a href="?/uname/100000{wc:$q_user['uid']}" target="_blank" title="{wc:$q_user['username']">{wc:$q_user['username']}</a></span>
                                </p>
                                <p>本云参与：<span class="r-num">{wc:$user_shop_number}</span>人次<a id="a_luckynum" href="javascript:;" class="r-look"></a></p>
                                <p>揭晓时间：<span>{wc:fun:microt($item['q_end_time'])}</span></p>
                                <p>云购时间：<span>{wc:fun:microt($item['q_end_time'])}</span></p>
                                <div class="result-head-pic">
                                    <div class="rh-wrap"><img width="110" height="110" src="statics/uploads/{wc:$q_user['img']}"></div><a rel="nofollow" href="?/uname/100000{wc:$q_user['uid']}" target="_blank" title="{wc:$q_user['username']}" class="ng-result-head transparent-png"><span class="name">获得者</span></a>
                                </div>
                            </div>
                            <div class="result-con-code">
                                <p class="code-name">— 幸运云购码 —</p>
                                <span class="code-num">
                                    {wc:loop $q_user_code_arr  $q_code_num}
                                    {wc:$q_code_num}
                                    {wc:loop:end}
                                </span>
                            </div>
                        </div>
                        <div class="result-how">
                            <h6>如何计算?</h6>
                            <p>1、以该商品最后支持时间为截至点，取全网最后50条支持时间记录；</p>
                            <p>2、每条时间记录按时、分、秒、毫秒依次排列成一个数值；</p>
                            <p>3、将50个数值之和加上最新一期时时彩中奖号对商品总价格取余，加上1为“幸运云购码”；</p>
                            <p>4、余数是指整数除法中被除数未被除尽部分， 如7÷3 = 2 ......1，1就是余数。</p>
                        </div>
                    </div>
                </div>
                                 <!--我的云购记录-->
                <div class="ng-goods-buy">
                    <div class="ng-buy-list">
                        <div class="ng-buy-nav">
                            <a href="javascript:;" title="最新云购记录" class="current">最新云购记录</a>
                        </div>
	                   <ul>
							{wc:loop $us $user}
							<li>
							<a href="{WEB_PATH}/uname/{wc:fun:idjia($user['uid'])}" target="_blank">
							{wc:if !empty($user['uphoto'])}
								<img src="{G_UPLOAD_PATH}/{wc:$user['uphoto']}" border="0" alt="" width="20" height="20">
							{wc:else}
								<img src="{G_UPLOAD_PATH}/photo/member.jpg" border="0" alt="" width="20" height="20">
							{wc:if:end}
							</a>					
							<a href="{WEB_PATH}/uname/{wc:fun:idjia($user['uid'])}" target="_blank" class="blue">{wc:$user['username']}</a>				
							<em class="Fb gray01">{wc:$user['gonumber']}</em>人次</li>
							{wc:loop:end}
						</ul>
                    </div>
      
                    
                </div>
            </div>
</div>



	<!-- 计算结果 所有参与记录 晒单 -->
	<div id="calculate" class="ProductTabNav">
	    <div id="divMidNav" class="DetailsT_Tit">
	        <div class="DetailsT_TitP">		     
                <ul>
			        <li class="Product_DetT DetailsTCur"><span class="DetailsTCur">计算结果</span></li>
			        <li class="All_RecordT"><span class="">所有参与记录</span></li>
			        <li class="Single_ConT"><span class="">晒单</span></li>          
		        </ul>
		    </div>
	    </div>
	</div>

	<!--补丁3.1.6_b.0.1-->
	<div id="divCalResult" class="Product_Content">	
		<div class="ygRecord" name="div_tab">
				<div class="yghelp">
					1、取该商品最后购买时间前网站所有商品的最后50条购买时间记录
					<br>
					2、每个时间记录按时、分、秒、毫秒依次排列取数值
					<br>
					3、将这50个数值之和加上最新一期时时彩中奖号码除以该商品总参与人次后取余数，余数加上1 即为“幸运{wc:fun:_cfg('web_name_two')}码”。
					{wc:if !$item['q_content']}
					{wc:if:end}
				</div>
				
				{wc:if !$item['q_content']}
				<div class="RecordOnehundred"><h4> 未满100条计算结果 </h4>
					<div class="ResultBox"><h2>计算结果</h2>
							<p class="num4">求和：
								<span class="Fb">{wc:$user_shop_time_add}</span>(揭晓时间求和结果)
								<br>取余：
								<span class="Fb">{wc:$user_shop_time_add}</span>(揭晓时间)
								<span class="Fb"> * 100 / {wc:$item['canyurenshu']}</span>(本商品总需参与人次)
								<span class="Fb"> = {wc:$user_shop_fmod}</span>(余数)
								<br>结果：
								<span class="Fb">{wc:$user_shop_fmod}</span>(余数)
								<span class="Fb"> + 1000001 = <em> {wc:$item['q_user_code']}</em></span>
							</p>
							<b>最终结果：{wc:$item['q_user_code']}</b>
						</div>  
						<div style="width:100%;height:30px;clear:bolt;"></div>
				</div>          
				{wc:else}
			  
				<ul class="Record_title">
					<li class="time">{wc:fun:_cfg('web_name_two')}时间</li>
					<li class="nem">会员账号</li>
					<li class="name">商品名称</li>
					<li class="much">{wc:fun:_cfg('web_name_two')}人次</li>
				</ul>
				<div class="RecordOnehundred"><h4>截止该商品揭晓购买时间【{wc:fun:microt($item['q_end_time'])}】最后50条全站购买时间记录</h4>
				<div class="FloatBox"></div>	
				   {wc:loop $item['q_content'] $record}
				   {wc:php:start}
						$itemid = $item['id'];
						$record_time = explode(".",$record['time']);
						$record['time'] = $record_time[0];
				   {wc:php:end}		
				   <ul class="Record_content">
						<li class="time"><b>{wc:fun:date("Y-m-d",$record['time'])}</b>{wc:fun:date("H:i:s",$record['time'])}.{wc:$record_time[1]}</li>
						<li class="timeVal">{wc:$record['timeadd']}</li>
						<li class="nem"><a class="gray02" href="{WEB_PATH}/uname/{wc:fun:idjia($record['uid'])}" target="_blank">{wc:fun:get_user_name($record['uid'])}</a></li>
						<li class="name"><a class="gray02" href="{WEB_PATH}/goods/{wc:$record['shopid']}" target="_blank">（第{wc:$record['shopqishu']}期）{wc:$record['shopname']}</a></li>
						<li class="much">{wc:$record['gonumber']}人次</li>
					</ul>	
					{wc:loop:end}
				</div>
					
					{wc:php:start}
						$shop_fmod = fmod($yj_timesum,$item['canyurenshu']);
					{wc:php:end}
					<div class="RecordOnehundred"><h4>50条计算结果</h4>
					 <div class="ResultBox"><h2>计算结果</h2>
						<p class="num4">求和：
							<span class="Fb">{wc:$item['q_counttime']} + {wc:$item['lot_time']} = {wc:$yj_timesum}</span>(上面50条{wc:fun:_cfg('web_name_two')}记录时间取值相加之与最新一期时时彩号码之和)
							<br>取余：
							<span class="Fb">{wc:$yj_timesum}</span>(100条时间记录之和)
							<span class="Fb"> % {wc:$item['canyurenshu']}</span>(本商品总需参与人次)
							<span class="Fb"> =  {wc:$shop_fmod}</span>(余数)
							<br>结果：
							<span class="Fb">{wc:$shop_fmod}</span>(余数)
							<span class="Fb"> + 1 = <em>{wc:$item['q_user_code']}</em></span>
						</p>
						<b>最终结果：{wc:$item['q_user_code']}</b>
					</div>
					<div style="width:100%;height:30px;clear:bolt;"></div>
				   </div>
				{wc:if:end}
				
			</div>
            
        
		<!-- 购买记录20条 -->
		<div name="div_tab" id="bitem" class="AllRecordCon">
			<iframe id="iframea_bitem" g_src="{WEB_PATH}/go/goods/go_record_ifram/{wc:$itemid}/20" style="width:978px; border:none;height:0px;" frameborder="0" scrolling="no"></iframe>		
		</div>	
	   <!-- /购买记录20条 -->
       <!--补丁3.1.6_b.0.1-->
       
       <!--补丁3.1.6_b.0.2-->
		<!-- 晒单 -->
		<div name="div_tab" id="divPost" class="Single_Content">
			<iframe id="iframea_divPost" g_src="{WEB_PATH}/go/shaidan/itmeifram/{wc:$itemid}" style="width:978px; border:none;height:0px;" frameborder="0" scrolling="no"></iframe>
		</div>
		<!-- 晒单 -->   
        <!--补丁3.1.6_b.0.2-->
	</div>
<script>
<!--补丁3.1.6_b.0.3-->
function set_iframe_height(fid,did,height){
	$("#"+fid).css("height",height);
}

$(function(){
var fouli=$(".DetailsT_TitP ul li");
var divCalResult =  $("div[name='div_tab']");
	fouli.click(function(){				
		var index=fouli.index(this);
		fouli.removeClass("DetailsTCur").eq(index).addClass("DetailsTCur");
		var iframe = divCalResult.hide().eq(index).find("iframe");
			if (typeof(iframe.attr("g_src")) != "undefined") {
			  	 iframe.attr("src",iframe.attr("g_src"));
				 iframe.removeAttr("g_src");
			}
			
		divCalResult.hide().eq(index).show();
	});
<!--补丁3.1.6_b.0.3-->
	

	$(".Announced_But").click(function(){
		var next_li = $(".DetailsT_TitP ul>li");
		var index = $(this).index()
		next_li.eq(index).click();
	});

	
	$(window).scroll(function(){
		if($(window).scrollTop()>=941){
			$("#divMidNav").addClass("nav-fixed");
		}else if($(window).scrollTop()<941){
			$("#divMidNav").removeClass("nav-fixed");
		}
	});
});
function divOpen(){
var height=$("#userRnoId").css("height");
	if(height=="90px"){
		$("#userRnoId").css("height","auto");
	}else{
		$("#userRnoId").css("height",90);
	};
}
$(function(){	
	$("#divOpen").click(divOpen);
});
</script>	
{wc:templates "index","footer"}